%tr
  %td
    =interaction_table_row.search_term
  - if @search_mode == 'genes'
    %td{title: interaction_table_row.gene_name + ' - ' + interaction_table_row.gene_long_name, class: "truncate"}
      = link_to gene_path(interaction_table_row.gene_name) do
        %strong
          = interaction_table_row.gene_name.html_safe
        = " - "
        %em
          %small
            =interaction_table_row.gene_long_name.html_safe
    %td{title: interaction_table_row.drug_name}
      =link_to truncate(interaction_table_row.drug_name.html_safe, length:50), drug_path(interaction_table_row.drug_name)
    %td
      =link_to interaction_table_row.types_string, interaction_claims_path(interaction_table_row.interaction_claim)
    %td
      = interaction_table_row.source_link
    %td{style: 'display:none;'}
      = interaction_table_row.gene_name
    %td{style: 'display:none;'}
      = interaction_table_row.gene_long_name
    %td{style: 'display:none;'}
      = interaction_table_row.source_db_version
  - else
    %td{title: interaction_table_row.drug_name, class: "truncate"}
      = link_to drug_path(interaction_table_row.drug_name) do
        %strong
          = interaction_table_row.drug_name.html_safe
    %td{title: interaction_table_row.gene_name + ' - ' + interaction_table_row.gene_long_name, class: "truncate"}
      =link_to gene_path(interaction_table_row.gene_name) do
        = interaction_table_row.gene_name.html_safe
        = " - "
        %em
          %small
            =interaction_table_row.gene_long_name.html_safe
    %td
      =link_to interaction_table_row.types_string, interaction_claims_path(interaction_table_row.interaction_claim)
    %td
      = interaction_table_row.source_link
    %td{style: 'display:none;'}
      = interaction_table_row.drug_name
    %td{style: 'display:none;'}
      = interaction_table_row.source_db_version
  %td
    =interaction_table_row.pmids.map { |p| p.value.strip }.join(', ')
  -# TODO: Figure out why adding this breaks sorting on the "By Source" page.